<!DOCTYPE html>
<html lang="{{ $.Site.Language.Lang | default "en" }}">
  {{ partial "site-head.html" . }}
  <body>
    {{ block "header" . }}{{ partial "site-header.html" .}}{{ end }}
    <main class="main-wrapper">
      <div class="document">
        {{ $home := .Site.Home }}
        <h1>{{ i18n "select-language" }}</h1>
        <p>{{ i18n "current-selection" }} {{ .Site.Language.LanguageName }}</p>
        <ul class="language-list">
          {{ range $.Site.Home.AllTranslations }}
          {{ $isCurrentLang := eq $home.Language .Language }}
            <li {{ if $isCurrentLang}} class="selected" {{ end }}>
              <a href="{{ .RelPermalink }}" lang="{{ .Language.Params.languageCode }}">{{.Language.LanguageName }}</a>
            </li>
          {{ end }}
        </ul>
      </div>
    </main>
    {{ block "footer" . }}{{ partial "site-footer.html" .}}{{ end }}
  </body>
</html>
